{% extends "layout.html" %}
{% block content %}
<div class="container mt-4">
    <h2 class="text-center my-4">算法在生活中的应用</h2>
    <div class="row">
        {% for resource in resources %}
            <div class="col-md-4 mb-4">
                <div class="card">
                    {% if resource.thumbnail %}
                        <img src="{{ resource.thumbnail }}" class="card-img-top" alt="Thumbnail">
                    {% endif %}
                    <div class="card-body">
                        <h3 class="card-title">{{ resource.title }}</h3>
                        <a href="{{ url_for('resource_detail', resource_id=resource.id) }}" class="btn btn-info">查看详情</a>
                    </div>
                </div>
            </div>
        {% endfor %}
    </div>
</div>
{% endblock %}
